package database;

/**
 * class DbFolder - symbolize a record of a folder in DB
 */
public class DbFolder {
	private Integer recordID;
	private String userID;
	private Integer folderID;
	private String folderName;
	private Boolean isDropbox;
	
	/***
	 * default constructor
	 */
	public DbFolder()	{}
	
	/**
	 * constructor - update userID,folderID,folderID,isDropbox fields
	 * @param userID - the user name
	 * @param folderID - the folder id
	 * @param folderName - the folder name
	 * @param isDropbox - a flag if the folder is a dropbox root
	 */
	public DbFolder(String userID,Integer folderID, String folderName, Boolean isDropbox)
	{
		this.userID = userID;
		this.folderID = folderID;
		this.folderName = folderName;
		this.isDropbox = isDropbox;
	}
	
	/***
	 * @return record id in the DB
	 */
	public Integer getRecordID() {
		return recordID;
	}
	
	/***
	 * @return user id
	 */
	public String getUserID() {
		return userID;
	}
	
	/***
	 * @return folder id
	 */
	public Integer getFolderID() {
		return folderID;
	}
	
	/***
	 * @return folder name
	 */
	public String getFolderName() {
		return folderName;
	}
	
	/**
	 * @return if the folder is a root folder of dropbox return 1, else 0.
	 */
	public Boolean getIsDropbox() {
		return isDropbox;
	}
	
	/**
	 * update recordID field
	 * @param recordID - record id in the DB
	 */
	public void setRecordID(Integer recordID) {
		this.recordID = recordID;
	}
	
	/**
	 * update userID field
	 * @param userID - user id
	 */
	public void setUserID(String userID) {
		this.userID = userID;
	}
	
	/**
	 * update folderID field
	 * @param folderID - folder id
	 */
	public void setFolderID(Integer folderID) {
		this.folderID = folderID;
	}
	
	/**
	 * update folderName field
	 * @param folderName - the folder name
	 */
	public void setFolderName(String folderName) {
		this.folderName = folderName;
	}

	/**
	 * update isDropbox field
	 * @param isDropbox - if the folder is a root folder of dropbox return 1, else 0.
	 */
	public void setIsDropbox(Boolean isDropbox) {
		this.isDropbox = isDropbox;
	}

}
